/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.marist.cs.os.g3;

import edu.marist.cs.os.g3.mos.MOS;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;

/**  
 *
 * @author Intern
 */
public class Main {

    public static void main(String[] args) {
        String inputFileArg = "input.txt";
        if (args.length == 1) {
            //Accept command line argument for input file
            inputFileArg = args[0];
        }
        File inputFile = new File(inputFileArg);
        //Establish output file and trace
        File outputFile = new File("output.txt");
        /*    try (PrintWriter writer = new PrintWriter(outputFile)) {
        writer.println("Test");
        }
        try (BufferedReader reader = new BufferedReader(new FileReader(inputFile))) {
        String line = reader.readLine();
        System.out.println(line);
        }*/
        File traceFile = new File("trace.txt");

        //Set up trace
            /*Logger trace = Logger.getLogger("edu.marist.cs.os.g3");
        trace.addHandler(new FileHandler(traceFile));
        trace.setLevel(Level.ALL);
        trace.info("All quiet on the Western front.");*/
        //"Boot up" operating system
        MOS mos = new MOS(inputFile, outputFile, traceFile);
        mos.run();

    }
}
